package com.hui.blog_server.controller;

import com.hui.blog_server.entity.Album;
import com.hui.blog_server.entity.ResponseResult;
import com.hui.blog_server.service.impl.AlbumServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 彩色的小灰
 */
@RestController
public class AlbumController {
    @Autowired
    AlbumServiceImpl albumService;

    @GetMapping("/album")
    public ResponseResult<List<Album>> getAlbum() {
        return ResponseResult.success(albumService.getAllAlbums());
    }
}
